package com.zy.datareceiver.binsess.monitoring.dao.impl;

import com.zy.datareceiver.binsess.monitoring.dao.MonitoringDataDao;
import com.zy.datareceiver.binsess.monitoring.entity.MonitoringData;
import com.zy.datareceiver.binsess.monitoring.mapper.MonitoringDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@CacheConfig(cacheNames = "monitoringData")
public class MonitoringDataDaoImpl implements MonitoringDataDao {

    @Autowired
    private MonitoringDataMapper monitoringDataMapper;

    @Cacheable(cacheNames = "list")
    @Override
    public List<MonitoringData> getDataByPointName(String pointName) {
        return monitoringDataMapper.getDataByPointName(pointName);
    }
}
